import 'package:flame/camera.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

// 注入Bloc
class FlameBlocWorld<B extends BlocBase<S>, S> extends World {
  final B bloc;

  FlameBlocWorld(this.bloc);

  B getBloc() => bloc;

  @override
  void onRemove() {
    bloc.close();
    super.onRemove();
  }
}
